import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginPage.vue'),
    },
    {
      path: '/home',
      name: 'home',
      // component: () => import('../views/HomeView.vue'),
      component: () => import('../views/index.vue'),

      children: [
        {
          path: '',
          name: 'index',
          // component: () => import('../views/index.vue'),
          component: () => import('../views/HomeView.vue'),
        },
        {
          path: '/warehouse/list',
          name: 'warehouse',
          component: () => import('../views/WareHouse.vue'),
        },
        // {
        //   path: '/employee/list',
        //   name: 'employee',
        //   component: () => import('../views/EmployeeView.vue'),
        // }
        {
          path: '/warehouse/shelf',
          name: 'shelf',
          component: () => import('../views/Shelf.vue'),
        },
        {
          path: '/warehouse/position',
          name: 'position',
          component: () => import('../views/Position.vue'),
        },
        {
          path: '/warehouse/area',
          name: 'area',
          component: () => import('../views/Area.vue'),
        },
        {
          path: '/employee/list',
          name: 'employee',
          component: () => import('../views/Employee.vue'),
        },
        {
          path: '/inbound/order',
          name: 'instore',
          component: () => import('../views/InStore.vue'),
        },
        {
          path: '/inbound/list',
          name: 'instoreOperation',
          component: () => import('../views/InOperation.vue'),
        },
        {
          path: '/outbound/order',
          name: 'outStore',
          component: () => import('../views/OutStore.vue'),
        },
        {
          path: '/outbound/list',
          name: 'outstoreOperation',
          component: () => import('../views/OutOperation.vue'),
        },
        {      
          path: '/stock/list',
          name: 'stock',
          component: () => import('../views/Stock.vue'),
        },
        {      
          path: '/data/statistics',
          name: 'stats',
          component: () => import('../views/Stats.vue'),
        },
        {
          path: '/user/list',
          name: 'user',
          component: () => import('../views/User.vue'),
        }

  
      ]
    }

  ]

})

export default router
